home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / GameKit / Makefiles / lib / Makefile.utilities < prev    next >
Makefile  |  1995-06-12  |  1KB  |  54 lines

  1. #
  2. #  NeXT common include file for Internal Makefiles
  3. #  Copyright 1987, 1991, NeXT Computer, Inc.
  4. #
  5. #  Maintained by Doug Wiebe.
  6. #
  7. #  This Makefile has the targets for various useful things.
  8. #
  9.  
  10. #  The depend target scans the source files for includes and generates
  11. #  the right dependencies to reflect those inter-file dependencies.
  12. #$(PRODUCT): .depend_done
  13.  
  14. depend .depend_done::
  15.     @if [ "`echo $(DERIVED_SRC)`" ]    ; then        \
  16.         $(MAKE) $(DERIVED_SRC);            \
  17.     fi
  18.     -/bin/rm -f Makefile.depends
  19.     -touch Makefile.depends
  20.     $(CC) -MD -E $(CFLAGS) $(MFILES) $(CFILES) $(SFILES) $(DERIVED_SRC) \
  21.         > /dev/null
  22.     @md -m Makefile.depends -d $(DFILES)
  23.     -touch .depend_done
  24.  
  25. # diffs the current sources with the installed sources
  26. diff::
  27.     for f in $(SRCS);                    \
  28.         do (echo $$f;                    \
  29.         csh -f -c "diff -c $(SRCROOT)/$$f $$f; exit 0")    \
  30.     done
  31.  
  32. # lints all source files (oh, what to do about .m's?? )
  33. lint:: $(CFILES)
  34.     lint -I$(INCDIR) $(CFILES) $(LINTLIBS) -lc
  35.  
  36. #  prints out all source files
  37. print:: $(SRCS)
  38.     $(PRINT) $(SRCS)
  39.  
  40. # shows object code size
  41. size:: $(PRODUCT)
  42.     sizelib $(PRODUCT)
  43.  
  44. #  The tags target creates an index on the source files' functions.
  45. tags:: $(MFILES) $(CFILES) $(PSWFILES) $(PSWMFILES) $(LFILES) \
  46.         $(LMFILES) $(YFILES) $(YMFILES) $(HFILES)
  47.     ctags $(MFILES) $(CFILES) $(PSWFILES) $(PSWMFILES) $(LFILES) \
  48.         $(LMFILES) $(YFILES) $(YMFILES) $(HFILES)
  49.  
  50. # shows line count of source
  51. wc: $(SRCS)
  52.     wc $(SRCS)
  53.  
  54.